package com.kevin.blog.dao;

import com.kevin.blog.po.Comment;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @Author Kevin
 * @Date 2021-04-28 16:33:38
 */
public interface CommentRepository extends JpaRepository<Comment, Long> {
    /**
     * 倒序去排序Comment评论具体实现
     *
     * @param blogId
     * @param sort
     * @return
     */
    List<Comment> findByBlogIdAndParentCommentNull(Long blogId, Sort sort);
}
